package other.a锁重入特性;

/**
 * Created by Administrator on 2016/12/3.
 */
public class Main {
    public static void main(String[] args) throws InterruptedException {
        final ChildObject co = new ChildObject();
        Runnable ar = new Runnable() {
            public void run() {
                co.childMethod();
            }
        };

        Runnable br = new Runnable() {
            public void run() {
                co.supMethod();
            }
        };

        Thread a = new Thread(ar);
        a.setName("a");
        Thread b = new Thread(br);
        b.setName("b");

        a.start();
        Thread.sleep(500);
        b.start();
    }
}
